import com.qiniu.common.QiniuException;
import com.qiniu.common.Zone;
import com.qiniu.storage.BucketManager;
import com.qiniu.storage.Configuration;
import com.qiniu.util.Auth;
import org.junit.Test;

public class QiniuTestDelete {

    @Test
    public void Delete(){


        //构造一个带指定 Region 对象的配置类
        Configuration cfg = new Configuration(Zone.zone0());

        String accessKey = "fKgiIk1qhoQf-p0jCcT2Y7Tm9bYIUbhFYAEqDjJE";
        String secretKey = "RpXSq0i-SDloCOxdQwX2AKZ1dY2ACEQCqzWrG4rK";
        String bucket = "lmkf";
        String key = "FvaXbXbMpOyxLBEACj8lfN0vNwDD";

        Auth auth = Auth.create(accessKey, secretKey);
        BucketManager bucketManager = new BucketManager(auth, cfg);

        try {
            bucketManager.delete(bucket, key);
        } catch (QiniuException e) {
            e.printStackTrace();
            System.out.println("删除失败");
            System.out.println(e.response.toString());

        }

    }

}
